package com.wtgroup.demo.leetcode.q060_排列序列_第k个排列;

import org.junit.Test;

public class Q060_Test {

    @Test
    public void foo1() {

        Q060_My1 q060_my1 = new Q060_My1();
        Q060_LC_1 q060_lc_1 = new Q060_LC_1();
        Q060_LC_B_Dfs q060_lc_b_dfs = new Q060_LC_B_Dfs();
        int[][] inputs = {
                // {3, 3},
                // {4, 9},
                // {3, 1},
                {9, 353955},
                {10, 232353},
                {15, 134232353},
        };
        for (int[] input : inputs) {
            System.out.println("---------------------------");
            // long t0 = System.currentTimeMillis();
            // String res = q060_my1.getPermutation(input[0], input[1]);
            // System.out.println("q060_my1, cost time: " + (System.currentTimeMillis() - t0));
            long t1 = System.currentTimeMillis();
            String res1 = q060_lc_1.getPermutation(input[0], input[1]);
            System.out.println(("q060_lc_1, cost time: " + (System.currentTimeMillis() - t1)));
            long t2 = System.currentTimeMillis();
            String res2 = q060_lc_b_dfs.getPermutation(input[0], input[1]);
            System.out.println("q060_lc_b_dfs, cost time: " + (System.currentTimeMillis() - t2));
            // System.out.println(res);
            System.out.println(res1);
            System.out.println(res2);
        }
    }

    @Test
    public void foo2() {
        Q060_LC_1 q060_lc_1 = new Q060_LC_1();
        int[][] inputs = {
                {3, 2},
        };
        for (int[] input : inputs) {
            String res1 = q060_lc_1.getPermutation(input[0], input[1]);
            System.out.println("---------------------------");
            System.out.println(res1);
        }
    }


}
